@extends('backend::common.common_right')
@section('content')
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <div class=" row m-b-sm m-t-sm">
                            <div class="col-md-6">
                                <div  class="btn-group">
                                    <a class="btn btn-primary" href="{{url('backend/userinvited?sort=invite_user_id')}}" aria-pressed="false">邀请人排序</a>
                            </div>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <table class="table table-striped table-bordered table-hover " id="editable">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>邀请人</th>
                                <th>邀请人VIP到期时间</th>
                                <th>被邀请人</th>
                                <th>被邀请人VIP到期时间</th>
                                <th>邀请时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            @foreach($invited as $invite)
                                <tr class="gradeX">
                                    <td>{{$invite->id}}</td>
                                    <td><a href="{{url('/author')}}?id={{$invite->id}}" target="__blank" class="text-navy">{{$invite->invite->name}}</a></td>
                                    <td>{{$invite->invite->vipduetime}}</td>
                                    <td class="center">{{$invite->user->name}}</td>
                                    <td class="center">{{$invite->user->vipduetime}}</td>
                                    <td class="center">{{$invite->created_at}}</td>
                                </tr>
                            @endforeach
                            </tbody>
                        </table>
                        {{$invited->appends(['sort' => isset($sort)?$sort:'',
                                                ])->links()}}
                    </div>
                </div>
            </div>
        </div>
@endsection

